﻿/*********************************************************************************
**                                                                              **
**  Copyright (C) 2024 LiLong                                                   **
**  This file is part of RinexFileReader.                                       **
**                                                                              **
**  RinexFileReader is free software: you can redistribute it and/or modify     **
**  it under the terms of the GNU General Public License as published by        **
**  the Free Software Foundation, either version 3 of the License, or           **
**  (at your option) any later version.                                         **
**                                                                              **
**  RinexFileReader is distributed in the hope that it will be useful,          **
**  but WITHOUT ANY WARRANTY; without even the implied warranty of              **
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               **
**  GNU General Public License for more details.                                **
**                                                                              **
**  You should have received a copy of the GNU General Public License           **
**  along with RinexFileReader. If not, see <https://www.gnu.org/licenses/>.    **
**********************************************************************************/
#pragma once

#include "Datadefine.h"
#include "MeteorologicalDataFile.h"
#include "NavigationMessageFile.h"
#include "ObservationDataFile.h"

#include <expected>
#include <string>
#include <variant>

namespace Rinex
{
class RINEXFILEREADER_EXPORT RindexFile : public std::variant<ObservationDataFile, NavigationMessageFile, MeteorologicalDataFile>
{
public:
    using Base = std::variant<ObservationDataFile, NavigationMessageFile, MeteorologicalDataFile>;
    using Base::Base;
    using Base::operator=;
    static std::expected<RindexFile, std::string> parse(const std::string& content);
};
} // namespace Rinex